package com.qinyi.system.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.qinyi.system.domin.SysConfig;
import com.qinyi.system.mapper.SysConfigMapper;
import com.qinyi.system.service.ISysConfigService;
import org.springframework.stereotype.Service;

/**
 * @author wangan on 2019/6/5
 * @description
 */
@Service
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements ISysConfigService {

	@Override
	public String selectConfigByKey(String key) {
		SysConfig config = new SysConfig();
		config.setConfigKey(key);
		config = baseMapper.getConfig(config);
		return config != null ? config.getConfigValue() : "";
	}
}
